Skip to content

[stable33] fix: Return type error after #60844#61199

Closed
artonge wants to merge 1 commit into
stable33from
artonge/fix/return_type_after_60844
Closed

[stable33] fix: Return type error after #60844#61199
artonge wants to merge 1 commit into
stable33from
artonge/fix/return_type_after_60844

Conversation

@artonge

@artonge artonge commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

@artonge artonge requested a review from a team as a code owner June 11, 2026 10:14
@artonge artonge requested review from Altahrim, ArtificialOwl, come-nc and icewind1991 and removed request for a team June 11, 2026 10:14
@artonge

artonge commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator Author

/backport! to stable32

Signed-off-by: Louis Chmn <louis@chmn.me>
@artonge artonge force-pushed the artonge/fix/return_type_after_60844 branch from be6e4ff to 1a10fae Compare June 11, 2026 10:16
* The fields to include in the search results
*
* @return list<string>
* @return array

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that sounds wrong. the new type is less strict

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error is:

Error: lib/private/Files/Search/SearchQuery.php:98:37: MoreSpecificReturnType: The declared return type 'list<string>' for OC\Files\Search\SearchQuery::getSelectFields is more specific than the inferred return type 'array<array-key, mixed>' (see https://psalm.dev/070)

Not sure what would be the best solution for that, it is not an issue in more recent versions as the return property is typed slightly differently

@artonge artonge closed this Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants